﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZR.Infrastructure
{
    public static class IdHelper
    {
        private static string LastNo = "";
        private static readonly object _lockNextNo = new object();
        public static string GetNextNo()
        {
            lock (_lockNextNo)
            {
                string generNo = DateTime.Now.ToString("yyyyMMddHHmmssfff");
                while (generNo.Equals(LastNo))
                {
                    generNo = DateTime.Now.ToString("yyyyMMddHHmmssfff");
                }
                return generNo;
            }
          
            
        }
    }
}
